package com.designpattern.proxy.demo2;

public class UserServiceProxy {

    private UserService userService;

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public void add(){
        log("add");
        userService.add();
    }

    public void query() {
        log("query");
        userService.query();
    }

    public void log(String msg){
        System.out.println("[Debug]"+msg+"日志信息");
    }
}
